import { createApp } from 'vue'
import App from './App.vue'
import { router } from './router/routers'
import createRouter from './router/routers'
import store from './store/Store'
import ElementPlus from './plugins/element-plus/index'
import 'animate.css'
import 'normalize.css'
import './assets/css/common.less'
import './assets/css/element-init.less'
import './assets/icon/iconfont.css'
//引入工具集合
import need_set_pro from './utils/need_set_pro'
import { is_system } from './axios/baseRequest'
const app = createApp(App)

//判断需要引入的路由
is_system().then(res=>{
  if(res.data.code == 0){
    store.commit('change_is_admin',true)
  }
  createRouter(res.data.code == 0)
  app.use(new ElementPlus()).use(need_set_pro).use(store).use(router).mount('#app')
})
